package org.exhaust.framework.net.server.tcp;

import io.netty.channel.Channel;
import io.netty.channel.EventLoopGroup;
import org.exhaust.framework.net.common.protocol.RunningState;

public interface TcpServer {

    /**
     * 启动
     *
     * @throws Exception
     */
    void start() throws Exception;


    /**
     * 停止
     */
    void stopGracefully();

    /**
     * 获取ServerSocketChannel
     *
     * @return
     */
    Channel getServerSocketChannel();

    /**
     * @return
     */
    RunningState getState();

    EventLoopGroup bossEventLoopGroup();

    EventLoopGroup workerEventLoopGroup();
}
